package com.imooc.demo.form;

import com.imooc.demo.dataobject.OrderDetail;
import com.imooc.demo.dto.CartDTO;
import lombok.Data;

import javax.persistence.Entity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Auther: 杨通通
 * @Date: 2021/11/7 19:42
 * @Description:订单表单
 */

@Data
public class OrderForm {

    @NotBlank(message = "姓名不能为空")
    private String name;

    @NotBlank(message = "手机号必填")
    private String phone;

    @NotBlank(message = "地址不能为空")
    private String address;

    @NotBlank(message = "openid必填")
    private String openid;

    /*购物车*/
    @NotEmpty(message = "购物车不能为空")
    private List<OrderDetail> items;
}